package org.brownflat.lighthouse.monitoring.ci;

import org.joda.time.DateTime;

import java.util.Comparator;

public class AscendingDateComparator implements Comparator<DateTime> {

    @Override
    public int compare(DateTime dateA, DateTime dateB) {
        if (dateA.isAfter(dateB)) {
            return 1;
        } else if (dateA.isBefore(dateB)) {
            return -1;
        }
        return 0;
    }
}
